package com.hx.order.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hx.order.mapper.ReceiverMapper;
import com.hx.order.domain.Receiver;
import com.hx.order.service.IReceiverService;

/**
 * 收货地址Service业务层处理
 * 
 * @author ord
 * @date 2023-05-28
 */
@Service
public class ReceiverServiceImpl implements IReceiverService {
    @Autowired
    private ReceiverMapper receiverMapper;

    /**
     * 查询收货地址
     * 
     * @param receiverId 收货地址主键
     * @return 收货地址
     */
    @Override
    public Receiver selectReceiverByReceiverId(Long receiverId)
    {
        return receiverMapper.selectReceiverByReceiverId(receiverId);
    }

    /**
     * 查询收货地址列表
     * 
     * @param receiver 收货地址
     * @return 收货地址
     */
    @Override
    public List<Receiver> selectReceiverList(Receiver receiver)
    {
        return receiverMapper.selectReceiverList(receiver);
    }

    /**
     * 新增收货地址
     * 
     * @param receiver 收货地址
     * @return 结果
     */
    @Override
    public int insertReceiver(Receiver receiver)
    {
        return receiverMapper.insertReceiver(receiver);
    }

    /**
     * 修改收货地址
     * 
     * @param receiver 收货地址
     * @return 结果
     */
    @Override
    public int updateReceiver(Receiver receiver)
    {
        return receiverMapper.updateReceiver(receiver);
    }

    /**
     * 批量删除收货地址
     * 
     * @param receiverIds 需要删除的收货地址主键
     * @return 结果
     */
    @Override
    public int deleteReceiverByReceiverIds(Long[] receiverIds)
    {
        return receiverMapper.deleteReceiverByReceiverIds(receiverIds);
    }

    /**
     * 删除收货地址信息
     * 
     * @param receiverId 收货地址主键
     * @return 结果
     */
    @Override
    public int deleteReceiverByReceiverId(Long receiverId)
    {
        return receiverMapper.deleteReceiverByReceiverId(receiverId);
    }
}
